using System;

namespace SharpMud.Text.Matching
{
	internal class StringMatcherMatch : IStringMatcherMatch
	{
	
		#region Private Variables
		private string _Value;
		private int _Index;
		#endregion

		#region Constructors
		private StringMatcherMatch()
		{
		}

		internal StringMatcherMatch(int index, string value)
		{
			_Value = value;
			_Index = index;
		}
		#endregion

		#region IStringMatcherMatch Members
		public string Value
		{
			get
			{
				return this._Value;
			}
		}
		public int Index
		{
			get
			{
				return this._Index;
			}
		}
		public int Length
		{
			get
			{
				return this._Value.Length;
			}
		}
		#endregion
		
		#region IComparable Members
		int IComparable.CompareTo(object obj)
		{
			return CompareTo((IStringMatcherMatch)obj);
		}
		public int CompareTo(IStringMatcherMatch obj)
		{
			return this.Value.CompareTo(obj.Value);
		}
		#endregion
	}
}
